<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{PWD}</title>
<link rel="stylesheet" href="../../css/mem_main.css" type="text/css">
<script Language="JavaScript1.2" type="text/javascript" src="/inc/checkdata_{intLang}.js"></script>
<script Language="JavaScript">
<!--
function finalcheck(){
	with(document.beMemberFrm){
		if(isEmpty(document.beMemberFrm.Password_o.value)){
			alert("{PWD_old_Insert}");
			document.beMemberFrm.Password_o.focus();
			return;
		}else if(isEmpty(document.beMemberFrm["Password"].value)){
			alert("{PWD_new_Insert}");
			document.beMemberFrm["Password"].focus();
			return;
		}else if(isEmpty(document.beMemberFrm.Password_c.value)){
			alert("{PWD_confirm_Insert}");
			document.beMemberFrm.Password_c.focus();
			return;
		}

		if(Password.value.length < 6 && Password.value.length > 0){
			alert("{PWD_alert1}");
			Password.focus();
		}else if(Password.value == Password_o.value){
			alert("{PWD_alert7}");
			Password.focus();
		}else if(Password.value != Password_c.value){
			alert("{PWD_alert2}");
			Password.focus();
		}else if(illegalPassword(Password.value)){
			alert("{PWD_alert3}");
			Password.focus();
		}else if(illegalPassword2(Password.value)){
			alert("{PWD_alert8}");
			Password.focus();
		}else{
			submit();
		}
	}
}

function illegalPassword(idd){
	var xid =  idd.toUpperCase();
	if(idd.length == 0)  return  false;
	var c  =  xid.charAt(0);
	for(var i = 0; i < xid.length; i++) {
		c = xid.charAt(i);
		if(!((('0'<=c)&&(c<='9'))||(('A'<=c)&&(c<='Z')) || c=='@' || c<='_')) return true;
	}
	return  false;		
}

function illegalPassword2(idd){
	var xid =  idd.toUpperCase();
	var c  =  xid.charAt(0);
	for(var i = 1; i < xid.length; i++) {
		if(c != xid.charAt(i))return false;
	}
	return true;
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<!-- 檢驗資料用 //-->
<form name="CheckDataForm">
	<input type="hidden" name="required" value="text;Password_o;{PWD_old}">
	<input type="hidden" name="required" value="text;Password;{PWD_new}">
	<input type="hidden" name="required" value="text;Password_c;{PWD_confirm}">
</form>
<!-- End .//-->
<!-- @ Force Start @//-->
<table class="MyTable" cellspacing="1" cellpadding="0" style="width: 400px;">
	<tr>
		<td class="MyTitle" align="left" style="width: 400px; font-size: 16px">
			 Dear {Account} ({Name})<b> : </b><br /><br />
			 {ForceTip}
		</td>
	</tr>
</table><br />
<!-- @ Force End @//-->
<form name="beMemberFrm" method="Post" action="user_pwdupdate.php">
<input type="hidden" name="Force" value="{Force}">
<table width="770" border="0" cellspacing="0" cellpadding="0" class="cmti">
  <tr> 
    <td>{PWD}:</td>
  </tr>
</table>

<div class="ctabdv"> 
  <table width="500" border="0" cellspacing="1" cellpadding="0" class="ctab">
    <tr class="clef"> 
      <td class="ctigaed">{PWD_old}</td>
      <td width="380"><input type="password" name="Password_o" size="10" class="zatexted"></td>
    </tr>
    <tr class="clef"> 
      <td class="ctigaed">{PWD_new}</td>
      <td><input type="password" name="Password" size="10" class="zatexted"> <font color="#0000FF">{PWD_Tip1} </font></td>
    </tr>
    <tr class="clef"> 
      <td class="ctigaed">{PWD_confirm}</td>
      <td><input type="password" name="Password_c" size="10" class="zatexted"> <font color="#0000FF">{PWD_Tip2} </font></td>
    </tr>
    <tr class="clef" bgcolor="#CCCCCC"> 
      <td colspan="2">{PWD_Tip3}</td>
    </tr>
    <tr class="clef"> 
      <td colspan="2" class="cedfoot"> 
        <input type="button" value="{Submit}" class="zabutton" onclick="finalcheck()">&nbsp;&nbsp;&nbsp; 
        <input type="reset" value="{Reset}" class="zabutton">
      </td>
    </tr>
  </table>
</div>
</form>
</body>
</html>
